
using UnityEngine;
namespace HyxFrame.Core
{
    /// <summary>
    /// 辅助类，用于在静态类中启动协程
    /// </summary>
    public class MonoBehaviourHelper : MonoBase
    {
        private static MonoBehaviourHelper _instance;
        public static MonoBehaviourHelper Instance
        {
            get
            {
                if (_instance == null)
                {
                    GameObject go = new GameObject("MonoBehaviourHelper");
                    _instance = go.AddComponent<MonoBehaviourHelper>();
                    DontDestroyOnLoad(go);
                }
                return _instance;
            }
        }
    }
}